import React, { useEffect, useState } from 'react'
import OnLiveUserItem from "../OnLiveUserItem";
import './index.scss'
import socket from '../../utils/io';
import { Idata } from '../../type/type';

interface Iprops {
  title?: string | React.ReactNode
  onLiveList: Idata[]
}



const OnLiveUserList: React.FC<Iprops> = (props: Iprops) => {
  const data = props.onLiveList
  return (
    <>
      <div className='OnLiveUserListBox'>
        {data.map((item, index) => (<OnLiveUserItem data={item} key={index + new Date().getTime()} />))}
      </div>
    </>
  )
}
export default OnLiveUserList
